package com.yunhe.policyfulfillment.authority.repository;

import com.yunhe.policyfulfillment.authority.domain.PolicyMenu;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author zhengbo
 * @date 2021/9/17 16:18
 */
@Repository
public interface PolicyMenuRepository {

    /**
     * 新增
     * @author zb
     * @date 2021/09/17
     **/
    int createMenuSelective(PolicyMenu menu);

    /**
     * 刪除
     * @author zb
     * @date 2021/09/17
     **/
    int deleteMenuByPrimaryKey(@Param("id") Long id);

    /**
     * 更新
     * @author zb
     * @date 2021/09/17
     **/
    int updateMenuByPrimaryKeySelective(PolicyMenu menu);

    /**
     * 根据主键查询
     * @author zb
     * @date 2021/09/17
     **/
    PolicyMenu searchMenuByPrimaryKey(@Param("id") Long id);

    /**
     * 根据菜单名查询菜单
     * @param title 菜单名
     * @return PolicyMenu
     */
    PolicyMenu searchMenuByTitle(@Param("title") String title);

    /**
     * 获取所有菜单列表
     * @return List<PolicyMenu>
     */
    List<PolicyMenu> searchPolicyMenus();
}
